<?php

// td1
$colTxt = "seller_id,buyer_id,summary_type,terminal_type,span,date,hour,cvpoint,site_id,item_id,item_type,location_id,buyer_type,campaign_id,article_id,link_id,image_id,keyword_id,page_id,carrier_id,model_id,key_text,imp,imp_uniq,imp_loss,click,click_uniq,cv,cv_uniq,cvi,cvi_uniq,reject,withdraw,cost,wholesale,retail,realtime_cost,realtime_wholesale,cv_app_id,app_store_id";
$cols = explode(',', $colTxt);

$valTxt = "DEFAULT,17896,24,1,4,'2013-12-18',18,0,8,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,0,DEFAULT,'',1,1,0,1,1,1,1,DEFAULT,DEFAULT,0,0,20.0,100.0,0,0,0,0,0";
$vals = explode(',', $valTxt);

$cnt = count($cols);
if($cnt != count($vals)) {
	$td1 = 'count cols != count count vals';
} else {
 for ($i = 0; $i < $cnt; $i++) {
	$td1 = $td1 . "$cols[$i]: $vals[$i]<br>";
  }
}

// td2
$colTxt = "seller_id,buyer_id,summary_type,terminal_type,span,date,hour,cvpoint,site_id,item_id,item_type,location_id,buyer_type,campaign_id,article_id,link_id,image_id,keyword_id,page_id,carrier_id,model_id,key_text,imp,imp_uniq,imp_loss,click,click_uniq,cv,cv_uniq,cvi,cvi_uniq,reject,withdraw,cost,wholesale,retail,realtime_cost,realtime_wholesale,cv_app_id,app_store_id";
$cols = explode(',', $colTxt);

$valTxt = "17896,DEFAULT,11,1,4,'2013-12-18',18,0,8,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,'',1,1,0,1,1,1,1,DEFAULT,DEFAULT,0,0,20.0,100.0,0,0,0,DEFAULT,DEFAULT";
$vals = explode(',', $valTxt);

$cnt = count($cols);
if($cnt != count($vals)) {
	$td2 = 'count cols != count count vals';
} else {
 for ($i = 0; $i < $cnt; $i++) {
	$td2 = $td2 . "$cols[$i]: $vals[$i]<br>";
  }
}


// td3
$colTxt = "seller_id,buyer_id,summary_type,terminal_type,span,date,hour,cvpoint,site_id,item_id,item_type,location_id,buyer_type,campaign_id,article_id,link_id,image_id,keyword_id,page_id,carrier_id,model_id,key_text,imp,imp_uniq,imp_loss,click,click_uniq,cv,cv_uniq,cvi,cvi_uniq,reject,withdraw,cost,wholesale,retail,realtime_cost,realtime_wholesale,cv_app_id,app_store_id";
$cols = explode(',', $colTxt);

$valTxt = "17896,DEFAULT,14,1,4,'2013-12-18',18,0,8,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,18,568,'',1,0,0,1,0,1,0,DEFAULT,DEFAULT,0,0,20.0,100.0,0,0,0,DEFAULT,DEFAULT";
$vals = explode(',', $valTxt);

$cnt = count($cols);
if($cnt != count($vals)) {
	$td3 = 'count cols != count count vals';
} else {
 for ($i = 0; $i < $cnt; $i++) {
	$td3 = $td3 . "$cols[$i]: $vals[$i]<br>";
  }
}


// td4
$colTxt = "seller_id,buyer_id,summary_type,terminal_type,span,date,hour,cvpoint,site_id,item_id,item_type,location_id,buyer_type,campaign_id,article_id,link_id,image_id,keyword_id,page_id,carrier_id,model_id,key_text,imp,imp_uniq,imp_loss,click,click_uniq,cv,cv_uniq,cvi,cvi_uniq,reject,withdraw,cost,wholesale,retail,realtime_cost,realtime_wholesale,cv_app_id,app_store_id";
$cols = explode(',', $colTxt);

$valTxt = "17896,DEFAULT,12,1,4,'2013-12-18',18,0,8,0,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,'',1,1,0,1,1,1,1,DEFAULT,DEFAULT,0,0,20.0,100.0,0,0,0,DEFAULT,DEFAULT";
$vals = explode(',', $valTxt);

$cnt = count($cols);
if($cnt != count($vals)) {
	$td4 = 'count cols != count count vals';
} else {
 for ($i = 0; $i < $cnt; $i++) {
	$td4 = $td4 . "$cols[$i]: $vals[$i]<br>";
  }
}

// td5
$colTxt = "seller_id,buyer_id,summary_type,terminal_type,span,date,hour,cvpoint,site_id,item_id,item_type,location_id,buyer_type,campaign_id,article_id,link_id,image_id,keyword_id,page_id,carrier_id,model_id,key_text,imp,imp_uniq,imp_loss,click,click_uniq,cv,cv_uniq,cvi,cvi_uniq,reject,withdraw,cost,wholesale,retail,realtime_cost,realtime_wholesale,cv_app_id,app_store_id";
$cols = explode(',', $colTxt);

$valTxt ="17896,DEFAULT,13,1,4,'2013-12-18',18,0,8,0,DEFAULT,0,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,DEFAULT,'',1,0,0,1,0,1,0,DEFAULT,DEFAULT,0,0,20.0,100.0,0,0,0,DEFAULT,DEFAULT";
$vals = explode(',', $valTxt);

$cnt = count($cols);
if($cnt != count($vals)) {
	$td5 = 'count cols != count count vals';
} else {
 for ($i = 0; $i < $cnt; $i++) {
	$td5 = $td5 . "$cols[$i]: $vals[$i]<br>";
  }
}
echo "<table border='0'>";
	echo "<tr>";
		echo "<td>";
			echo "<b>summary_cv_app_hour</b><br>";
			echo $td1;
		echo "</td>";
		echo "<td style='padding-left: 20'>";
			echo "<b>summary_site_hour</b><br>";
			echo $td2;
		echo "</td>";
		echo "<td style='padding-left: 20'>";
			echo "<b>summary_terminal_hour</b><br>";
			echo $td3;
		echo "</td>";
		echo "<td style='padding-left: 20'>";
			echo "<b>summary_item_hour</b></br>";
			echo $td4;
		echo "</td>";
		echo "<td style='padding-left: 20'>";
			echo "<b>summary_location_hour</b><br>";
			echo $td5;
		echo "</td>";
	echo "</tr>";
echo "</table>";



